﻿using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;

namespace AfrikDotnetWebSite.Models
{
    public class AfrikDotnetContext : DbContext
    {
        public AfrikDotnetContext()
            : base("AfrikDotnetConnection")
        {
        }

        public DbSet<UserProfile> UserProfiles { get; set; }
        public DbSet<Sponsor> Sponsors { get; set; }
        public DbSet<UserGroup> UserGroups { get; set; }
        public DbSet<SiteSetting> SiteSettings { get; set; }
        public DbSet<Donation> Donations { get; set; }
        public DbSet<Ad> Ads { get; set; }
        public DbSet<Show> Shows { get; set; }
        public DbSet<News> News { get; set; }
        public DbSet<Job> Jobs { get; set; }
        public DbSet<Project> Projects { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
            base.OnModelCreating(modelBuilder);
        }
    }
}